{	Problem: http://codeforces.ru/problemset/problem/70/B
	Verdict: Accepted
}
{$R+,S+,Q+,I+,C+,M+,O-}
uses SysUtils;
var i,n,k:longint; p,w,s:string; r:int64;  f:boolean;
begin
readln(n);
readln(s);
k:=length(S);
w:='';
p:='';
r:=0;
f:=true;
for i:=1 to k do begin
  w:=w+s[i];
  if (s[i]='.') or (S[i]='?') or (s[i]='!') then begin
    if length(p)>0 then
      if p[1]=' ' then delete(p,1,1);
    if (length(p+w)>n) and (p<>'') then begin
      inc(r);
      p:='';
      if w[1]=' ' then delete(w,1,1);
      if length(w)>n then begin
        f:=false;
        break;
      end else
      if length(w)=n then inc(r) else p:=w;
    end else
    if (length(w)>n) and (p='') then begin
      if w[1]=' ' then delete(w,1,1);
      if length(w)>n then begin
        f:=false;
        break;
      end else
      if length(w)=n then inc(r) else p:=w;
    end else
    if length(p+w)=n then begin
      inc(r);
      p:='';
    end else p:=p+w;
    w:='';
  end;
end;
if p<>'' then
  if length(p)>n then f:=false else inc(r);
if f then write(r) else write('Impossible');
end.